package org.ssh.dao.impl;

import com.sun.xml.internal.bind.v2.model.core.ID;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.ssh.dao.BackLogDao;
import org.ssh.pojo.BacklogEntity;

import java.util.List;

/**
 * @author ZH
 * @date 2022年01月18日 12:07:00
 * @version: 1.0.0
 */
@Repository
public class BackLogDaoImpl implements BackLogDao {

    @Autowired
    SessionFactory sessionFactory;

    @Override
    public Session getSession() {
        return sessionFactory.getCurrentSession();
    }

    @Override
    public BacklogEntity getBackLog(long id) {
        return sessionFactory.getCurrentSession().get(BacklogEntity.class, id);
    }
}
